

class Cache:
    def __init__(self):
        self.user_cache: dict[str, dict[str, any]] = {}
        self.product_cache: dict[str, dict[str, any]] = {}
    
    def get_user_cache(self, user_id: str) -> dict[str, any]:
        return self.user_cache.get(user_id, {})
    
    def set_user_cache(self, user_id: str, value: dict[str, any]):
        self.user_cache[user_id] = value
    
    def delete_user_cache(self, user_id: str):
        del self.user_cache[user_id]
        
    def clear_user_cache(self):
        self.user_cache.clear()

    def get_product_cache(self, product_id: str) -> dict[str, any]:
        return self.product_cache.get(product_id, {})
    
    def set_product_cache(self, product_id: str, value: dict[str, any]):
        self.product_cache[product_id] = value
        
    def delete_product_cache(self, product_id: str):
        del self.product_cache[product_id]
        
    def clear_product_cache(self):
        self.product_cache.clear()
        
    def clear_all_cache(self):
        self.user_cache.clear()
        
        
